{% extends 'social_base.html' %}
{% load static %}
{% block title %}
{{ username }}的好友留言
{% endblock %}
{% block head %}
<style>
    body {
        font-family: 'Arial', sans-serif;
        margin: 0;
        padding: 0;
        background-color: #f5f5f5;
        background-image: url("{{ MEDIA_URL }}{{ user_profile.background_image }}");
        background-size: cover;
    }
</style>
{% endblock %}

{% block body %}
<div class="profile-container">

    <h1>{{ username }}的好友留言</h1>

    <ul>
        {% for message in user_messages %}
        <li>
            {{ message.sender.nickname }} 在 {{ message.created_at }} 给你留言：
            <p>{{ message.content }}</p>
            <a
                href="{% url 'huifu' sender_username=message.receiver.user.username    receiver_username=message.sender.user.username %}">回复</a>
        </li>
        {% endfor %}
    </ul>

</div>
{% endblock %}